package com.example.administrator.wallet.constant;

import java.io.File;
import java.util.HashMap;
import java.util.Map;

import cn.finalteam.okhttpfinal.RequestParams;

/**
 * Effect: 接口地址+参数
 * <p>
 * Author:  CaiYapeng
 * <p>
 * Time  :  2018/7/12.
 */

public class Api {

    public static final String BaseUrl = "https://wallet.kinlink.cn/api";
    //创建用户，获取Token
    public static final String Request_Token = "/member/login";
    //获取币种列表
    public static final String Coin_List = "/member/coin-list";
    //创建钱包地址
    public static final String Wallet_local = "/member/create-wallet";
    //获取首页总资产和币种列表及余额
    public static final String Main_List = "/home/main";
    //根据地址查询转账记录(01-3-1首页)
    public static final String currency = "/currency/record";
    //获取行情列表
    public static final String QuotationList = "/market/ticker";
    //获取ETH转账前参数
    public static final String ETHParameter = "/transaction/prepare";
    //发送ETH交易
    public static final String ETHTransaction = "/transaction/send";
    //获取用户信息
    public static final String User_Information = "/member/info";
    //获取消息,公告列表
    public static final String Message_List = "/member/message-list";
    //提交反馈
    public static final String Feed_Back = "/feedback/add";
    //添加联系人
    public static final String Add_Contact = "/member/add-contact";
    //获取联系人列表
    public static final String Contact_List = "/member/contact-list";
    //修改联系人资料
    public static final String Modify_Contact = "/member/modify-contact";
    //删除联系人
    public static final String Delete_Contact = "/member/delete-contact";
    //用户交易记录，我的-支出-收入    type：1.全部 2.支出  3.收入
    public static final String Currency_Records = "/currency/get-record";
    //个人中心验证手机号
    public static final String Get_Mobile_Varcode = "/member/get-mobile-varcode ";
    //个人中心绑定手机号
    public static final String Bind_Mobile_Varcode = "/member/bind-mobile-varcode";
    //个人中心资料修改
    public static final String Info_Update = "/member/info-update";
    //获取BTC转账前参数
    public static final String BTCParameter = "/transactionbtc/prepare";
    //发送BTC交易信息
    public static final String BTCTransaction = "/transactionbtc/send";
    //助记词恢复账号
    public static final String Zhujici = "/member/recover-wallet";
    //获取常用货币类型
    public static final String get_currency_state = "/ramification/get-currency-list";
    //暂时关闭或打开一种货币
    public static final String currency_statu = "/ramification/set-currency-status";
    //交易详情页接口
    public static final String transaction_detail = "/currency/transaction-detail";
    //搜索代币
    public static final String query_coin = "/ramification/search";
    //添加个人代币
    public static final String add_coin = "/ramification/add";
    public static final String Transaction_Detail = "/currency/transaction-detail";
    //查询版本号是否需要更新
    public static final String Get_Version = "/currency/get-version";
    //上传图片
    public static final String upload_image = "/certification/upload-image";
    //实名认证
    public static final String Set_Real = "/certification/set-real";
    //获取实名认证信息
    public static final String get_info = "/certification/get-info";
    //获取收款信息列表
    public static final String gathering_get_list = "/gathering/get-list";
    //获取收款类型
    public static final String Get_Method = "/gathering/get-method";
    //删除收款信息
    public static final String Del_Proceed = "/gathering/del-proceed";
    //修改收款信息
    public static final String Up_Proceed = "/gathering/up-proceed";
    //获取单个收款信息详情
    public static final String Get_One = "/gathering/get-one";
    //获取开户行列表
    public static final String Get_Bank = "/gathering/get-bank";
    //CC-03.获取资产余额
    public static final String Exchange_Balance = "/exchange/balance";
    //Exchange-LH-02.用户设置交易所密码
    public static final String Generate_Addr = "/wallet/generate-addr";
    //Exchange-LH-03.修改交易所密码
    public static final String Change_Password = "/wallet/change-password";
    //Exchange-LH-04.忘记交易所密码
    public static final String Forget_Password = "/wallet/forget-password";
    //Exchange-LH-07.撤销委托单
    public static final String Cancel_Order = "/exchange/cancel-order";
    //Exchange-LH-08.充值前准备（ETH）
    public static final String Bank_Prepare_ETH = "/bank/prepare";
    //Exchange-LH-08.充值前准备（BTC）
    public static final String Bank_Prepare_BTC = "/bank/prepare-btc";
    //Exchange-LH-09.开始充值（ETH）
    public static final String Bank_Send_ETH= "/bank/send";
    //Exchange-LH-09.开始充值（BTC）
    public static final String Bank_Send_BTC_USDT= "/bank/send-btc";
    //Exchange-LH-12.转出操作（从银行转出到个人账户）
    public static final String Bank_Turn_Out= "/bank/turn-out";
    //Exchange-LH-13.银行交易记录明细
    public static final String Bank_Recharge_Details= "/bank/recharge-details";

    //获取币币交易所详情
    public static final String Get_Coin_Market = "/exchange/market";
    //获取资产余额
    public static final String GETTRANSACTIONASSET = "/exchange/balance";

    //http获取WebSocket数据
    public static final String HTTPGETWEBSOCKET = "http://47.105.103.240:8080";

    //WebSocket
    public static final String WEBSOCKETURL = "ws://47.105.103.240:8090";

    public static final String chinese = "zh_cn";
    public static final String english = "en_us";
    public static final String network = "main_network";

    public static final Map<String, String> getLoginParams(String msg) {
        Map<String, String> map = new HashMap<>();
        map.put("message", msg);
//        map.put("chain_network", network);
        return map;
    }

    public static final Map<String, String> getWalletLocalParams(String token, String msg, String signature, String EtherLocal, String BitcoinLocal, String btc_message, String btc_signature) {
        Map<String, String> map = new HashMap<>();
        map.put("access_token", token);
        map.put("message", msg);
        map.put("signature", signature);
        map.put("btc_addr", BitcoinLocal);
        map.put("eth_addr", EtherLocal);
        map.put("btc_message", btc_message);
        map.put("btc_signature", btc_signature);
//        map.put("chain_network", network);
        return map;
    }

    public static final Map<String, String> getMainList(String token, String chain_network) {
        Map<String, String> map = new HashMap<>();
        map.put("access_token", token);
//        map.put("chain_network", network);
        return map;
    }

    public static final Map<String, String> getCurrency(String token, String wallet_addr, String coin_symbol, String language, String page) {

        Map<String, String> map = new HashMap<>();
        map.put("access_token", token);
        map.put("wallet_addr", wallet_addr);
        map.put("coin_symbol", coin_symbol);
        map.put("language", language);
        map.put("page", page);
//        map.put("chain_network", network);
        return map;
    }

    public static final Map<String, String> getParameter(String token, String coin_symbol, String wallet_addr, String chain_network) {
        Map<String, String> map = new HashMap<>();
        map.put("access_token", token);
        map.put("coin_symbol", coin_symbol);
        map.put("wallet_addr", wallet_addr);
//        map.put("chain_network", network);
        return map;
    }

    public static final Map<String, String> getUserInformation(String token, String language) {
        Map<String, String> map = new HashMap<>();
        map.put("access_token", token);
        map.put("language", language);
//        map.put("chain_network", network);
        return map;
    }

    public static final Map<String, String> getETHTransaction(String token, String coin_symbol, String wallet_addr, String to, String value, String gas_price, String gas, String nonce, String data, String raw, String chain_network) {
        Map<String, String> map = new HashMap<>();
        map.put("access_token", token);
        map.put("coin_symbol", coin_symbol);
        map.put("wallet_addr", wallet_addr);
        map.put("to", to);
        map.put("value", value);
        map.put("gas_price", gas_price);
        map.put("gas", gas);
        map.put("nonce", nonce);
        map.put("data", data);
        map.put("raw", raw);
//        map.put("chain_network", network);
        return map;
    }

    public static final Map<String, String> getMessageList(String token, String type) {
        Map<String, String> map = new HashMap<>();
        //type(0.公告 1.个人消息)
        map.put("access_token", token);
        map.put("type", type);
//        map.put("chain_network", network);
        return map;
    }

    public static final Map<String, String> putFeedBack(String token, String content) {
        Map<String, String> map = new HashMap<>();
        map.put("access_token", token);
        map.put("content", content);
//        map.put("chain_network", network);
        return map;
    }

    public static final Map<String, String> getAddContact(String token, String name, String
            wallet_addr, String coin_symbol, String mobile, String email, String remark) {
        Map<String, String> map = new HashMap<>();
        map.put("access_token", token);
        map.put("name", name);
        map.put("wallet_addr", wallet_addr);
        map.put("coin_symbol", coin_symbol);
        map.put("mobile", mobile);
        map.put("email", email);
        map.put("remark", remark);
//        map.put("chain_network", network);
        return map;
    }

    public static final Map<String, String> getContactList(String token) {
        Map<String, String> map = new HashMap<>();
        map.put("access_token", token);
//        map.put("chain_network", network);

        return map;
    }

    public static final Map<String, String> getModifyContact(String token, String id, String
            name, String wallet_addr, String coin_symbol, String mobile, String email, String remark) {
        Map<String, String> map = new HashMap<>();
        map.put("access_token", token);
        map.put("id", id);
        map.put("name", name);
        map.put("wallet_addr", wallet_addr);
        map.put("coin_symbol", coin_symbol);
        map.put("mobile", mobile);
        map.put("email", email);
        map.put("remark", remark);
//        map.put("chain_network", network);

        return map;
    }

    public static final Map<String, String> getDeleteContact(String token, String id) {
        Map<String, String> map = new HashMap<>();
        map.put("access_token", token);
        map.put("id", id);
//        map.put("chain_network", network);
        return map;
    }

    public static final Map<String, String> getCurrencyRecords(String token, String
            language, String page, String type) {
        Map<String, String> map = new HashMap<>();
        map.put("access_token", token);
        map.put("language", language);
        map.put("page", page);
        map.put("type", type);//2.支出  3.收入
//        map.put("chain_network", network);

        return map;
    }

    public static final Map<String, String> getGetMobileVarcode(String token, String
            mobile_phone) {
        Map<String, String> map = new HashMap<>();
        map.put("access_token", token);
        map.put("mobile_phone", mobile_phone);
//        map.put("chain_network", network);
        return map;
    }

    public static final Map<String, String> getBindMobileVarcode(String token, String
            mobile_phone, String varcode) {
        Map<String, String> map = new HashMap<>();
        map.put("access_token", token);
        map.put("mobile_phone", mobile_phone);
        map.put("varcode", varcode);//验证码
//        map.put("chain_network", network);
        return map;
    }

    public static final Map<String, String> getInfoUpdate(String token, String
            nickname) {
        Map<String, String> map = new HashMap<>();
        map.put("access_token", token);
        map.put("nickname", nickname);
//        map.put("chain_network", network);
        return map;
    }

    public static final Map<String, String> getInfoName(String token, String
            nickname) {
        Map<String, String> map = new HashMap<>();
        map.put("access_token", token);
        map.put("nickname", nickname);
//        map.put("chain_network", network);
        return map;
    }

    public static final Map<String, String> getBTCParameter(String token, String coin_symbol, String wallet_addr) {
        Map<String, String> map = new HashMap<>();
        map.put("access_token", token);
        map.put("coin_symbol", coin_symbol);
        map.put("wallet_addr", wallet_addr);
//        map.put("chain_network", network);
        return map;
    }

    public static final Map<String, String> getBTCTranscation(String token, String
            coin_symbol, String wallet_addr, String to, String input, String value, String fee, String data, String raw) {
        Map<String, String> map = new HashMap<>();
        map.put("access_token", token);
        map.put("coin_symbol", coin_symbol);
        map.put("wallet_addr", wallet_addr);
        map.put("to", to);
        map.put("input", input);
        map.put("value", value);
        map.put("fee", fee);
        map.put("data", data);
        map.put("raw", raw);
//        map.put("chain_network", network);
        return map;
    }

    public static final Map<String, String> getCoinList(String token, String chain_network) {
        Map<String, String> map = new HashMap<>();
        map.put("access_token", token);
//        map.put("chain_network", network);
        return map;
    }


    public static final RequestParams getImage(String token, File image) {
        RequestParams params = new RequestParams();
        params.addFormDataPart("access_token", token);
        params.addFormDataPart("image", image);
//        params.addFormDataPart("chain_network", network);
        return params;
    }

    public static final Map<String, String> getZhujici(String msg, String signature, String EtherLocal, String BitcoinLocal, String btc_message, String btc_signature) {
        Map<String, String> map = new HashMap<>();
        map.put("message", msg);
        map.put("signature", signature);
        map.put("btc_addr", BitcoinLocal);
        map.put("eth_addr", EtherLocal);
        map.put("btc_message", btc_message);
        map.put("btc_signature", btc_signature);
//        map.put("chain_network", network);
        return map;
    }


    public static final Map<String, String> getCurrencyStatu(String access_token) {
        Map<String, String> map = new HashMap<>();
        map.put("access_token", access_token);
//        map.put("chain_network", network);
        return map;
    }

    public static final Map<String, String> setCurrencyStatu(String access_token, String symbol, String status) {
        Map<String, String> map = new HashMap<>();
        map.put("access_token", access_token);
        map.put("symbol", symbol);
        map.put("status", status);
//        map.put("chain_network", network);
        return map;
    }

    public static final Map<String, String> setTransactionDetail(String access_token, String addr, String tx_hash,String coin_symbol) {
        Map<String, String> map = new HashMap<>();
        map.put("access_token", access_token);
        map.put("addr", addr);
        map.put("tx_hash", tx_hash);
        map.put("coin_symbol", coin_symbol);
//        map.put("chain_network", network);
        return map;
    }

    public static final Map<String, String> getQueryCoin(String access_token, String keyword) {
        Map<String, String> map = new HashMap<>();
        map.put("access_token", access_token);
        map.put("keyword", keyword);
//        map.put("chain_network", network);
        return map;
    }


    public static final Map<String, String> setAddCoin(String access_token, String symbol, String icon, String unit, String token_addr) {
        Map<String, String> map = new HashMap<>();
        map.put("access_token", access_token);
        map.put("symbol", symbol);
        map.put("icon", icon);
        map.put("unit", unit);
        map.put("token_addr", token_addr);
//        map.put("chain_network", network);
        return map;
    }

    public static final Map<String, String> getVersion(String access_token, String os, String soft_ver) {
        //<p>公共参数：os【系统型号：android/ios/miniprogram】</p>
        // <p>公共参数：os_ver【操作系统版本号】</p>
        //<p>公共参数：soft_ver【软件版本号】</p>
        Map<String, String> map = new HashMap<>();
        map.put("access_token", access_token);
        map.put("os", os);
        map.put("soft_ver", soft_ver);
//        map.put("chain_network", network);
        return map;
    }
    public static final Map<String, String> getSet_Real(String access_token, String real_name, String id_number,String id_card_img,String id_card_img2) {
        Map<String, String> map = new HashMap<>();
        map.put("access_token", access_token);
        map.put("real_name", real_name);
        map.put("id_number", id_number);
        map.put("id_card_img", id_card_img);
        map.put("id_card_img2", id_card_img2);
//        map.put("chain_network", network);
        return map;
    }
    public static final Map<String, String> getinfo(String access_token) {
        Map<String, String> map = new HashMap<>();
        map.put("access_token", access_token);
//        map.put("chain_network", network);
        return map;
    }
    public static final Map<String, String> getGatheringGetList(String access_token) {
        Map<String, String> map = new HashMap<>();
        map.put("access_token", access_token);
//        map.put("chain_network", network);
        return map;
    }

    public static final Map<String, String> getGet_Method(String access_token) {
        Map<String, String> map = new HashMap<>();
        map.put("access_token", access_token);
//        map.put("chain_network", network);
        return map;
    }
    public static final Map<String, String> getDel_Proceed(String access_token,String id) {
        Map<String, String> map = new HashMap<>();
        map.put("access_token", access_token);
        map.put("id", id);
//        map.put("chain_network", network);
        return map;
    }
    public static final Map<String, String> getUp_Proceed(String access_token,String id,String proceeds_type,String account,String username,String bank_name,String qrcode) {
        Map<String, String> map = new HashMap<>();
        map.put("access_token", access_token);
        map.put("id", id);
        map.put("proceeds_type", proceeds_type);
        map.put("account", account);
        map.put("username", username);
        map.put("bank_name", bank_name);
        map.put("qrcode", qrcode);
//        map.put("chain_network", network);
        return map;
    }
    public static final Map<String, String> getGetOne(String access_token,String id) {
        Map<String, String> map = new HashMap<>();
        map.put("access_token", access_token);
        map.put("id", id);
//        map.put("chain_network", network);
        return map;
    }
    public static final Map<String, String> getGetBank(String access_token) {
        Map<String, String> map = new HashMap<>();
        map.put("access_token", access_token);
//        map.put("chain_network", network);
        return map;
    }
    public static final Map<String, String> getExchangeBalance(String access_token) {
        Map<String, String> map = new HashMap<>();
        map.put("access_token", access_token);
//        map.put("chain_network", network);
        return map;
    }
    public static final Map<String, String> getGenerateAddr(String access_token,String password,String password_confirm) {
        Map<String, String> map = new HashMap<>();
        map.put("access_token", access_token);
        map.put("password", password);
        map.put("password_confirm", password_confirm);
//        map.put("chain_network", network);
        return map;
    }
    public static final Map<String, String> getChangePassword(String access_token,String old_password,String new_password,String password_confirm) {
        Map<String, String> map = new HashMap<>();
        map.put("access_token", access_token);
        map.put("old_password", old_password);
        map.put("new_password", new_password);
        map.put("password_confirm", password_confirm);
//        map.put("chain_network", network);
        return map;
    }
    public static final Map<String, String> getForgetPassword(String access_token,String phone_number,String varcode,String new_password,String password_confirm) {
        Map<String, String> map = new HashMap<>();
        map.put("access_token", access_token);
        map.put("phone_number", phone_number);
        map.put("varcode", varcode);
        map.put("new_password", new_password);
        map.put("password_confirm", password_confirm);
//        map.put("chain_network", network);
        return map;
    }
    public static final Map<String, String> getCancelOrder(String access_token,String market,String order_id) {
        Map<String, String> map = new HashMap<>();
        map.put("access_token", access_token);
        map.put("market", market);
        map.put("order_id", order_id);
//        map.put("chain_network", network);
        return map;
        /*access_token：<input name="access_token" type="text" value="TxpUMccv-7oYfMyfpce0SCxBxLYqWdxJ_1533713782" size="60"/>
			交易区(BTCUSDT/ETHUSDT/ETHBTC)：<input type="text" name="market">
			订单ID(order_id)：<input type="text" name="order_id">*/
    }
    public static final Map<String, String> getBankPrepareETH(String access_token, String coin_symbol,String wallet_addr) {
        Map<String, String> map = new HashMap<>();
        map.put("access_token", access_token);
        map.put("coin_symbol", coin_symbol);
        map.put("wallet_addr", wallet_addr);
//        map.put("chain_network", network);
        return map;
    }
    public static final Map<String, String> getBankPrepareBTC_USDT(String access_token, String coin_symbol,String wallet_addr) {
        Map<String, String> map = new HashMap<>();
        map.put("access_token", access_token);
        map.put("coin_symbol", coin_symbol);
        map.put("wallet_addr", wallet_addr);//from
//        map.put("chain_network", network);
        return map;
    }
    public static final Map<String, String> getBankSendETH(String access_token, String coin_symbol,String wallet_addr,String to,String value,String gas_price,String gas,String nonce,String data,String raw) {
        Map<String, String> map = new HashMap<>();
        map.put("access_token", access_token);
        map.put("coin_symbol", coin_symbol);
        map.put("wallet_addr", wallet_addr);
        map.put("to", to);
        map.put("value", value);
        map.put("gas_price", gas_price);
        map.put("gas", gas);
        map.put("nonce", nonce);
        map.put("data", data);
        map.put("raw", raw);

//        map.put("chain_network", network);
        return map;
    }
    public static final Map<String, String> getBankSendBTC_USDT(String access_token, String coin_symbol,String wallet_addr,String to,String input,String value, String fee,String data,String raw) {
        Map<String, String> map = new HashMap<>();
        map.put("access_token", access_token);
        map.put("coin_symbol", coin_symbol);
        map.put("wallet_addr", wallet_addr);
        map.put("to", to);
        map.put("input", input);
        map.put("value", value);
        map.put("fee", fee);
        map.put("data", data);
        map.put("raw", raw);

//        map.put("chain_network", network);
        return map;
    }
    public static final Map<String, String> getBankTurnOut(String access_token, String coin_symbol,String wallet_addr,String value) {
        Map<String, String> map = new HashMap<>();
        map.put("access_token", access_token);
        map.put("coin_symbol", coin_symbol);
        map.put("wallet_addr", wallet_addr);
        map.put("value", value);
//        map.put("chain_network", network);
        return map;
    }
    public static final Map<String, String> getBankRechargeDetails(String access_token, String page,String page_size,String coin_symbol,String transaction_type,String begin_time,String end_time) {
        Map<String, String> map = new HashMap<>();
        map.put("access_token", access_token);
        map.put("page", page);
        map.put("page_size", page_size);
        map.put("coin_symbol", coin_symbol);
        map.put("transaction_type", transaction_type);
        map.put("begin_time", begin_time);
        map.put("end_time", end_time);
//        map.put("chain_network", network);
        return map;
    }

    public static final Map<String, String> getCoinMarket(String access_token) {
        Map<String,String> map = new HashMap<>();
        map.put("access_token",access_token);
        map.put("chain_network", network);
        return map;
    }

    public static final Map<String,String> getTransactionAsset(String access_token,String asset_type){
        Map<String,String> map = new HashMap<>();
        map.put("access_token",access_token);
        map.put("asset_type",asset_type);
        return map;
    }

}
